package com.wdb.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wdb.domain.ColumnInfo;
import com.wdb.domain.GenConfig;
import com.wdb.domain.TableInfo;
import com.wdb.utils.PageResult;
import org.springframework.http.ResponseEntity;

import java.util.List;

/**
 * @author: wendaobai@qq.com
 * @date: 2024/9/23 星期一 10:43
 */
public interface GeneratorService extends IService<ColumnInfo> {
    PageResult<TableInfo> getTables(String name, Page<Object> page);

    List<ColumnInfo> getColumns(String table);

    List<ColumnInfo>  query(String table);

    void sync(List<ColumnInfo> columns, List<ColumnInfo> query);

    void save(List<ColumnInfo> columnInfos);

    void generator(GenConfig genConfig, List<ColumnInfo> columns);

    ResponseEntity<Object> preview(GenConfig genConfig, List<ColumnInfo> columns);
}
